package com.song.controller;

import com.song.model.Student;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName : MyController
 * @Author : 司猫子
 * @Date: 2021/3/1 22:59
 */
@RestController
public class MyController {

    @PutMapping("/student/{id}/{name}/{age}")
    public Student dopost(@PathVariable("id") Integer id,@PathVariable("name") String name,@PathVariable("age") Integer age){
        Student student = new Student(id, name, age);
        return student;
    }


}
